package org.javaboy;

import com.baomidou.mybatisplus.generator.FastAutoGenerator;
import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;

import java.nio.file.Paths;

public class CodeGenerator {
    public static void main(String[] args) {
        FastAutoGenerator.create("jdbc:mysql://s2.javaboy.org:3306/ai-interview", "root", "123")
                .globalConfig(builder -> builder
                        .author("javaboy")
                        .outputDir("D:\\ai-interview\\code\\ai-interview\\ai-interview-main\\src\\main\\java")
                )
                .packageConfig(builder -> builder
                        .parent("org.javaboy.ai")
                        .entity("domain")
                        .mapper("mapper")
                        .service("service")
                        .serviceImpl("service.impl")
                        .xml("mapper.xml")
                )
                .strategyConfig(builder -> builder
                        .addInclude("ai_interview_banner", "ai_interview_category", "ai_interview_category_item", "ai_interview_interview_records", "ai_interview_models", "wx_login")
                        .addTablePrefix("ai_interview_")
                )
                .templateEngine(new FreemarkerTemplateEngine())
                .execute();
    }
}
